#ifndef _UI_SPRITE_H_
#define _UI_SPRITE_H_

#ifdef _WIN32
#pragma once
#endif

// 05.03.12 - Matthew Brews - Original Creation.

#include <d3dx9.h>

#include "panel.h"
#include "texturecontainer.h"
#include "texture.h"
#include "devicemanager.h"
#include "constants.h"

class CUISprite : public CPanel
{
public:
    CUISprite(const string &szTextureName);
    CUISprite(CTexture *pTexture);
    ~CUISprite();

    void setRotation(float fAngle);
    void setRotationDegrees(float fAngle);
    float getRotation() const;
    float getRotationDegrees() const;

    void setScale(float fScaleX, float fScaleY);
    float getScaleX() const;
    float getScaleY() const;

    void render();

    LPD3DXSPRITE getSprite() const;

    void setTexture(const string &szTextureName);
    void setTexture(CTexture *pTexture);
    CTexture *getTexture() const;

private:
    CTexture *m_pTexture;

    float m_fScaleX;
    float m_fScaleY;

    float m_fRotation;

    LPD3DXSPRITE m_pSprite;
};

#endif